home *** CD-ROM | disk | FTP | other *** search
- /*
- * Helpfull macros for memory allocation
- */
-
- #include <exec/memory.h>
-
- #define MEMFLAGS MEMF_CLEAR
-
- #define NEWSTRUCT(s,p) (p=(struct s *)AllocMem(sizeof(struct s),MEMFLAGS))
- #define FREESTRUCT(s,p) (FreeMem(p,sizeof(struct s)))
- #define NEWCHAR(p,n) (p=(char *)AllocMem(n+1,MEMFLAGS))
- #define FREECHAR(p) (FreeMem(p,strlen(p)+1))
-
- extern APTR AllocMem();
-